package com.hzb.springcloud.controller;

import com.hzb.springcloud.entities.CommonResult;
import com.hzb.springcloud.entities.Payment;
import com.hzb.springcloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @version v1.0
 * @ProjectName: cloud2020
 * @ClassName: OrderFeignController
 * @Description: TODO(一句话描述该类的功能)
 * @Author: huangZB
 * @Date: 2020/3/16 12:34
 */
@RestController
public class OrderFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    /**
     * @Title:
     * @Description: TODO(这里用一句话描述这个方法的作用)
     * @param @param
     * @return @return
     * @author huangZB
     * @throws
     * @date
     */
    @GetMapping(value = "/consumer/payment/getPaymentById/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") String id){

        return paymentFeignService.getPaymentById(id);
    }

    @GetMapping(value = "/consumer/payment/feign/timeout")
    public String paymentFeignTimeout(){
        return paymentFeignService.paymentFeignTimeout();
    }



}
